<template>
  <div>
    <van-nav-bar
      title="标题"
      left-text="返回"
      right-text="按钮"
      left-arrow
      @click-left="onClickLeft"
      @click-right="onClickRight"
    />

    <van-row>
      <van-col span="6">
        <van-sidebar v-model="activeKey">
          <router-link to='/wechat/a'>
            ><van-sidebar-item title="a"
          /></router-link>

          <router-link to='/wechat/b'>
            <van-sidebar-item title="b"
          /></router-link>
          <van-sidebar-item title="c" />
        </van-sidebar>
      </van-col>
      <van-col span="18">
        <router-view></router-view>
      </van-col>
    </van-row>
  </div>
</template>

<script>
import { Toast } from "vant";
import a from "../../components/a.vue";
import b from "../../components/b.vue";
export default {
  data() {
    return {
      activeKey: 0,
    };
  },
  methods: {
    onClickLeft() {
      Toast("返回");
    },
    onClickRight() {
      Toast("按钮");
    },
  },
  components: {
    a,
    b,
  },
};
</script>

<style>
</style>